import request from "@/utils/request";
//封装注册请求方法
export const register = (data) => {
  return request.post ('user/registered',data)
}
//封装登录请求方法 
export const login = (data) => {
  return request.post('user/login',data)
}

//封装获取用户信息的请求
export const getUserInfo = (data) => {
  return request.get('user',data)
}

//封装获取城市请求
export const city = (params) => {
  return request.get('area/city?level=1',{params},)
}

// 封装 我的收藏
export const getCollect = (params) => {
  return request.get('user/favorites',{params})
}